///<reference path="../../../types/sgs/index.d.ts"/>

import { DELETE_MESSAGE, SEND_MESSAGE, UPDATE_SESSION } from '@/src/store/type'

export function sendMessage(newMessage) {
    return {
        type: SEND_MESSAGE,
        payload: newMessage
    }
}

export function deleteMessage(timestamp) {
    return {
        type: DELETE_MESSAGE,
        meta: {
            timestamp
        }
    }
}


export function updateSession(newSession) {
    return {
        type: UPDATE_SESSION,
        payload: newSession
    }
}
